﻿using System;

namespace ExcelToolsSampleDocument
{
  // ==================================================================================
  /// <summary>
  /// This attributes represents a sample method that can be called from this 
  /// document sample.
  /// </summary>
  // ==================================================================================
  [AttributeUsage(AttributeTargets.Method)]
  class SampleAttribute: Attribute
  {
    private string _Name;
    private string _Description;

    // --------------------------------------------------------------------------------
    /// <summary>
    /// Creates the attibute with setting the name value.
    /// </summary>
    /// <param name="name">Name value of this attribute.</param>
    // --------------------------------------------------------------------------------
    public SampleAttribute(string name)
    {
      _Name = name;
    }

    // --------------------------------------------------------------------------------
    /// <summary>
    /// Creates the attibute with setting the name and description attribute.
    /// </summary>
    /// <param name="name">Name value of this attribute.</param>
    /// <param name="description">Description value.</param>
    // --------------------------------------------------------------------------------
    public SampleAttribute(string name, string description)
    {
      _Name = name;
      _Description = description;
    }

    // --------------------------------------------------------------------------------
    /// <summary>
    /// Gets the name value of this attribute.
    /// </summary>
    // --------------------------------------------------------------------------------
    public string Name
    {
      get { return _Name; }
    }

    // --------------------------------------------------------------------------------
    /// <summary>
    /// Gets the description value of this attribute.
    /// </summary>
    // --------------------------------------------------------------------------------
    public string Description
    {
      get { return _Description; }
    }
  }
}
